import { defineStore } from "pinia";
import { ref } from "vue";

export const useUserStore = defineStore(
  "userStore",
  () => {
    let userInfo = ref({});

    function changeUserInfo(value) {
      userInfo.value = {
        ...userInfo.value,
        ...value,
      };
    }
    return { userInfo, changeUserInfo };
  },
  {
    persist: true,
  }
);
